Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Agent Not Found from 8.5.1 custom toolbar button

Button code:
_unid := @Text(@DocumentUniqueID);
ENVIRONMENT PARAM1 := @Implode(@DbName:_unid; ",");
@Command([MailOpen]);
@Command([ToolsRunMacro];"ExportFields")

In Mail database, Agent code:
ExportFields:
Option Public
Option Explicit
Sub Initialize
Dim session As New NotesSession
Dim wksp As New NotesUIWorkspace
Dim doc As NotesDocument
Dim db As NotesDatabase
Dim strParam$, varArr

strParam = session.GetEnvironmentString("Param1")
If strParam = "" Then
' do selected document in current view.
Set db = session.CurrentDatabase
If Not (wksp.CurrentDocument Is Nothing) Then
Msgbox "This agent must be run from a view. The user's access is determined by data already stored in the document -- not by the results of field default and computed field formulas after they open the document."
Exit Sub
End If
Set doc = session.DocumentContext
If doc Is Nothing Then
Msgbox "You must highlight a document before you run this agent."
Exit Sub
End If
Else
' Param1 had a value in it. This contains the server name, db filepath, and document UNID delimited by ",")
session.SetEnvironmentVar "Param1", ""
varArr = Split(strParam, ",")
Set db = New NotesDatabase(varArr(0), varArr(1))
Set doc = db.GetDocumentByUNID(varArr(2))
If doc Is Nothing Then
Msgbox "Oops! Can't figure out argument: " & strParam
Exit Sub
End If
End If

WriteFieldsMeta doc

End Sub
Sub WriteFieldsMeta (doc As NotesDocument )

On Error Resume Next

Dim fileNum1 As Integer
Dim FldName As String
Dim FldText As String
Dim FldType As Integer
Dim FldSize As Long

fileNum1% = Freefile
Open "D:\Fields.csv" For Output As fileNum1%
Dim item As NotesItem
Forall i In doc.Items
FldName = i.Name
FldType = i.Type
FldSize = i.ValueLength
Set item =doc.GetFirstItem( FldName ) '
Forall v In item.Values
FldText = v
If v <> " " Or Not Isnull(v) Or Not (v Is Nothing) Then
Write #fileNum1%, FldName, FldText, FldType, Cstr( FldSize )
End If
End Forall
End Forall
Close fileNum1%
Print "File written to D:\Fields.csv"
End Sub


Feedback response number WEBB87QMXU created by ~Umberto Kitookony on 07/26/2010

Toolbar setup does not work with 8.... (~Evelyn Rehipiv... 23.Nov.09)
. . I will ask my boss for new hardware... (~Evelyn Rehipiv... 24.Nov.09)
. . The message probably does mean the ... (~Bill Frokimari... 25.Nov.09)
. . . . Toolbar setup does not work with 8.... (~Evelyn Rehipiv... 26.Nov.09)
. . . . urg (~Evelyn Rehipiv... 27.Nov.09)
. . . . . . 1028 (~Evelyn Rehipiv... 30.Nov.09)
. . . . . . . . well, wel (~Evelyn Rehipiv... 1.Dec.09)
. . . . . . . . . . . (~Evelyn Rehipiv... 17.Dec.09)
. . . . . . . . . . . . No problem with basic client (~Evelyn Rehipiv... 29.Jan.10)
. . . . . . . . . . . . . . Agent Not Found from 8.5.1 custom t... (~Umberto Kitook... 26.Jul.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS